//Pick Omit 处理数据结构
//Exclude Extract 处理集合类型的
// Paramters ReturnValue infer
//字符串类型 模板字符串$}' + infer

//1.部分属性可选
interface Person {
  name: string;
  age: number;
  address: string;
}
// Partial<Pick<T, K> 生成可选类型
// Omit<T, K>; 生成必填类型
// 然后合并

type PartialProps0ptional<T extends object, K extends keyof T> = Partial<
  Pick<T, K>
> &
  Omit<T, K>;
type Computed<T> = {
  [K in keyof T]: T[K];
};
// Computed处理之前 Partial<Pick<Person, "age" | "address">> & Omit<Person, "age" | "address">
// Computed处理之后 type p1 = { age?: number | undefined; address?: string | undefined; name: string;}
type p1 = Computed<PartialProps0ptional<Person, "age" | "address">>;
export {};
